<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/conn.asp"-->
<!--#include file="lib/saferequest.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<link rel="stylesheet" href="lib/sheet.css" type="text/css" />
<link type="text/css" rel="stylesheet" href="lib/ui/themes/base/ui.all.css" />
<!-- jquery和ui -->
<script type="text/javascript" src="lib/jquery.js"></script>
<script type="text/javascript">
	$(function() {
		$(".contable").addClass("ct");	//载入table样式
		$(".contable th").addClass("ch");	//载入th样式
		$(".contable td").addClass("ld");	//载入td样式
	});
</script>
</head>
<%
If Not Session("MM_Reg") Then
	response.write("您没有登陆，请登陆后使用!<br>")
	response.write "<a href='javascript:history.go(-1)'> << 返回上一页</a><br> "
	response.end
End If
if Session("MM_Flag")<1 then
	response.write("您没有查询权限！<br>")
	response.write "<a href='javascript:history.go(-1)'> << 返回上一页</a><br> "
	response.End
end if
if Session("MM_Post")<>2 And Session("MM_Post")<>0 Then
	response.write("您没有此岗位操作权限！<br>")
	response.write "<a href='javascript:history.go(-1)'> << 返回上一页</a><br> "
	response.End
end If
if request.QueryString("id")<>"" then id=SafeRequest("id",1) Else response.end
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from yb LEFT JOIN cl ON yb.cyr = cl.clid where id="&id
rs.open sql,conn,1,1
If rs.eof Then
	response.write("货单不存在！")
	response.end
End If
%>
<body>
<table class="contable">
	<thead>
		<tr>
			<th colspan="4" class="lh"><font size="4">基本信息</font>(录入时间:<%=rs("lrsj")%>&nbsp;下单人:<%=rs("xdr")%>)</th>
		</tr>
	</thead>
  <tr>
    <th>序号</th>
    <td><%=rs("id")%></td>
    <th>货单日期</th>
    <td><%=rs("rq")%></td>
  </tr>
  <tr>
    <th>详细厂名</th>
    <td colspan="4"><%=rs("client")%></td>
	</tr>
	<tr>
    <th>联系方式</th>
    <td colspan="4"><%=rs("contacts")%></td>
  </tr>
	<tr>
    <th>货主</th>
    <td colspan="4"><%=rs("hz")%></td>
  </tr>
  <tr>
    <th>托运人</th>
    <td><%=rs("tyr")%></td>
    <th>承运人</th>
    <td><%=rs("clm")%>(<%=rs("cph")%>)</td>
  </tr>
  <tr>
    <th>地点</th>
    <td><%=rs("dd")%></td>
		<th>时间</th>
		<td><%If IsDate(rs("sj")) Then response.write(formatdatetime(rs("sj"),4))%></td>
	</tr>
	<tr>
    <th>船名/航次</th>
    <td><%=rs("cmhc")%></td>
		<th>下单日期</th>
		<td><%=rs("xdrq")%></td>
  </tr>
  <tr>
    <th>提单号</th>
    <td><%=rs("tdh")%></td>
    <th>箱型</th>
    <td><%=rs("xx")%></td>
  </tr>
  <tr>
    <th>箱号</th>
    <td><%=rs("xh")%></td>
    <th>封号</th>
    <td><%=rs("fh")%></td>
  </tr>
	<thead>
		<tr>
			<th colspan="4" class="lh"><font size="4">基本费用</font></th>
		</tr>
	</thead>
  <tr>
    <th>提箱</th>
    <td><%=rs("tx")%></td>
    <th>还箱</th>
    <td><%=rs("hx")%></td>
  </tr>
  <tr>
    <th>应付运费</th>
    <td><%=rs("jsj")%></td>
    <th>堆存费</th>
    <td><%=rs("dcf")%></td>
  </tr>
  <tr>
    <th>垫资</th>
    <td><%=rs("dz")%></td>
    <th>管理成本</th>
    <td><%
														if rs("jsj")<>"" or rs("jsj")<>0 or rs("jgf")<>"" or rs("jgf")<>0 then 
															if rs("jsj")="" or isnull(rs("jsj")) then jsj0=0 else jsj0=rs("jsj")
															if rs("jgf")="" or isnull(rs("jgf")) then jgf0=0 else jgf0=rs("jgf")
															response.write(formatnumber((jsj0+jgf0)*0.1,2,-1))
														end if
												%></td>
  </tr>
  <tr>
    <th>注意事项</th>
    <td colspan="3"><%=rs("attentions")%></td>
  </tr>
  <tr>
    <th>车队备注</th>
    <td colspan="3"><%=rs("bz")%></td>
  </tr>
</table>
<br>
<p>最后更改人:<%=rs("gxry")%>&nbsp;最后更新时间:<%=rs("gxsj")%></p>
<br>
<p>
操作>> <%If (rs("post")=2 And Session("MM_Post")=2) or Session("MM_Post")=0 Then%>| <a href="edit_cd1.asp?id=<%=id%>">货单编辑</a> |<%If Session("MM_Post")=0 Then%> <a href="delete_cd.asp?id=<%=id%>" onClick="return confirm('你真的想删除这个货单吗？')">货单删除</a> |<%End If%><%End If%>
</p>
</body>
<%
rs.close
Set rs=Nothing
conn.close
Set conn=nothing
%>
</html>
